//
//  GKBEquipmentsManager.m
//  GBKHOME
//
//  Created by XMYY-25 on 2017/9/29.
//
//

#import "GKBEquipmentsManager.h"
#import "NewEquipment.h"

@interface GKBEquipmentsManager()
@property (nonatomic, strong) NSArray *areaArray;
@property (nonatomic, strong) NSArray<NewEquipment *> *equipmentsArray;
@property (nonatomic, strong) NSDictionary *curRooms;
@end

@implementation GKBEquipmentsManager

static GKBEquipmentsManager* _instance = nil;

#pragma mark --init singleton
+(instancetype) shareInstance
{
    static dispatch_once_t onceToken ;
    dispatch_once(&onceToken, ^{
        _instance = [[self alloc] init] ;
        _instance.areaArray = [NSArray new];
        _instance.equipmentsArray = [NSArray new];
        _instance.curRooms = [NSDictionary new];
    });
    
    return _instance ;
}

#pragma mark --设备
- (void) setEquipmentsArray:(NSArray<NewEquipment *> *)equipmentsArray{
    [GKBEquipmentsManager shareInstance].equipmentsArray = equipmentsArray;
}

- (NSArray *)getEquipmentsArray{
    return [GKBEquipmentsManager shareInstance].equipmentsArray;
}

#pragma mark --区域
- (void)setAreaArray:(NSArray *)areaArray{
    [GKBEquipmentsManager shareInstance].areaArray = areaArray;
}

- (NSArray *)getAreaArray{
    return [GKBEquipmentsManager shareInstance].areaArray;
}

#pragma mark --
- (void)setCurRooms:(NSDictionary *)curRooms{
    [GKBEquipmentsManager shareInstance].curRooms = curRooms;
}

- (NSDictionary *)getCurRooms{
    return [GKBEquipmentsManager shareInstance].curRooms;
}

@end
